package month4.day15;

import java.util.Scanner;

public class S3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("文件命名:");
            String s1 = sc.next();
            String reg = "[\u4e00-\u9fa5]+\\.(zip|rar)";
            boolean b = s1.matches(reg);
            if (b) {
                System.out.println(s1 + "命名正确");
            } else {
                System.out.println(s1 + "命名错误");
            }
        }
    }
}
